#
#  persistent configuration options
#
#  see also DISTRO_SPECS DISTRO_PET_REPOS DISTRO_COMPAT_REPOS-*
#
#  **NOTE**: check the original file every once in a while
#            settings might be added or removed...
#

#----------------
#support/findpkgs (called by most scripts)
#----------------
## set to 'yes' to speed up process..
USE_FINDPKGS_SEARCH_HELPER=yes
USE_FINDPKGS_DEP_HELPER=yes

#----------
# 1download
#----------
## this will check all remote pkg repos and choose the working ones
CHECK_REMOTE_PKG_REPOS=no

#----------
# 2download
#----------
# binaries are usually already stripped. set to 'no' to speed up process
STRIP_BINARIES=yes

#-------------
# 3builddistro
#-------------

## -- Live CD --
## The default is to use the traditional Puppy Live CD (isolinux)
## However there are 2 other options.
## UEFI_ISO overrides GRUB4DOS_ISO if both are set to YES..
## UEFI_ISO also supports legacy BIOS booting
##    On 32 bit systems this will still boot legacy BIOS however it
##      Will not boot 32 bit UEFI machines. These are rare anyway.
UFEI_ISO=no
G4DOS_ISO=no

## Kernel tarballs repo URL
## for choosing/downloading kernel
KERNEL_REPO_URL=http://distro.ibiblio.org/puppylinux/huge_kernels

## Kernel tarball URL
## avoid being asked questions about downloading/choosing a kernel
#KERNEL_TARBALL_URL=http://distro.ibiblio.org/puppylinux/huge_kernels/huge-3.14.55-slacko_noPAE.tar.bz2

## compression method to be used (SFS files)
SFSCOMP='-comp xz -Xbcj x86 -b 512K'
#SFSCOMP='-comp xz'
#SFSCOMP='-comp gzip'
#SFSCOMP='-noI -noD -noF -noX'

## if "$WOOF_HOSTARCH" = "$WOOF_TARGETARCH"
## Would you like to strip all binary executables and shared library files?
## These are usually already stripped, although some packages may have the shared
## library files stripped with the '--strip-debug' option only, and extra stripping
## should be okay. It won't do any harm answering yes here.
EXTRA_STRIPPING=yes

## -- Dependency check --
## if $WOOF_HOSTARCH" = "$WOOF_TARGETARCH"
## The script can optionally do a thorough dependency check
## This may take a long time.
CHECK_BINARY_DEPS=no

## PPM2 or the Classic gui for PPM?
UICHOICE=PPM2

## Puppy is normally run as the 'administrator' (root) user, though there is
## also 'fido' which is not currently very mature.
## The structure of Puppy is such that we consider root to be safe (with a full
## disclaimer of any responsibility if anything does go wrong), but there is a
## compromise, to run as root but to run Internet apps as user 'spot'.
## Note, in a running Puppy 'Menu->System->Login & Security Manager'
##    can be used to enable or disable running as spot.
RUN_INTERNET_APPS_AS_SPOT=no

## Certain Xorg drivers require KMS (Kernel ModeSetting)
## A value of '1' means on, '0' means off.
## assume not using kms at all when boot from sd card (arm arch).
KMS_i915=1
KMS_radeon=1
KMS_nouveau=1

## -- Xorg Auto --
## - This overrides DISTRO_XORG_AUTO in DISTRO_SPECS..
## - For ARM it's always set 'no' (may be changed)
## Do you want Xorg to start automatically at first boot (or at 'pfix=ram'
## kernel boot param) or run Xorg Wizard? The latter has been the case for
## earlier puppies. Automatic startup of X usually works, though in some
## cases may choose the wrong monitor resolution or driver -- which can be"
## fixed by running Xorg Wizard afterward. (yes/no)
XORG_AUTO=

## -- Xorg Text DPI (dots por inch) --
## this is overriden by PTHEME - $DEFAULT_THEME_XORG_TEXT_DPI
## see 'rootfs-complete/root/.Xresources' for the current value
## You can specify a font dpi if you wish
##   ...72 78 84 90 96 102 108 1114 120..
XORG_TEXT_DPI=

## -- pTheme -- applies only if ptheme pkg is being used
##    woof-code/rootfs-packages/ptheme/usr/share/ptheme/globals
## You can choose a ptheme here if you wish
## otherwise 3builddistro will ask you to choose one
PTHEME="UPupBB"
#PTHEME="Dark Touch"
#PTHEME="Dark Mouse"
#PTHEME="Bright Touch"
#PTHEME="Bright Mouse"

## -- ROX desktop text - black --
## The ROX-Filer desktop text defaults to white with black shadow, but this is
## not best for some light backgound images.
#ROX_TEXT_BLACK=yes

## ROX-Filer defaults to 'DejaVu Sans 10' font for the desktop. 
## If you would prefer bold text 'DejaVu Sans Bold 10',
## type in a full font specification (ex: Mono 12)
ROXFILER_FONT=

## -- Xload in JWM --
## By default xload is displayed in JWM. You can disable it here...
JWM_XLOAD=yes

## -- Custom wallpapers -- if mkwallpaper is in $PATH
## Do you want to build some custom wallpapers?
CUSTOM_WALLPAPERS=no

## -- Locale --
## Puppy is built with a default locale LANG=en_US and keyboard layout KMAP=us,
## which may be changed after bootup.
## However, if you are building a language-specific Puppy, you may change the
## defaults. But, please do make sure that your Puppy has a 'langpack' PET
## for your language installed -- if one does not exist, then you will have to
## create one -- see MoManager in the Utility menu, also read the Menu -> Help
## -> HOWTO Internationalization.
## see valid locales in /usr/share/i18n/locales
## (the default is en_US.UTF-8)
DEFAULTLANG=

## -- Keyboard layout --
## Default is english (en, us, "")
## Choose another one if you wish..
##   azerty be-latin1 br-abnt2 br-abnt br-latin1-abnt2 br-latin1-us by cf
##   croat cz de de-latin1 dk dvorak dvorak-l dvorak-r es et fi fr
##   gr hu101 hu il it jp106 lt mk nl no pl pt-latin1 ro ru
##   se sg sk-qwerty sk-qwertz slovene sv-latin1 uk us wangbe
KEYMAP=

## -- Default Apps --
## Not all are implemented in the puppy scripts,
##   but you can specify a default app if you wish...
## If you specify a value it will override anything that previously
##   set that value in the corresponding script...
## These are the current default*apps (scripts) in /usr/local/bin
DEFAULTAPPS="
defaultarchiver=
defaultaudioeditor=
defaultaudiomixer=
defaultaudioplayer=
defaultbrowser=light
defaultcalendar=
defaultcdplayer=
defaultcdrecorder=
defaultchat=hexchat
defaultchmviewer=
defaultconnect=
defaultcontact=osmo
defaultdraw=inkscape
defaultemail=
defaultfilemanager=
defaulthandler=
defaulthtmleditor=geany
defaulthtmlviewer=light
defaultimageeditor=mtpaint
defaultimageviewer=viewnior
defaultmediaplayer=gnome-mplayer
defaultpaint=
defaultpdfviewer=evince
defaultprocessmanager=
defaultrun=
defaultscreenshot=tas
defaultspreadsheet=gnumeric
defaultterminal=lxterminal
defaulttexteditor=geany
defaulttextviewer=geany
defaultwordprocessor=abiword
"

## - extra commands --
## Here add custom commands to be executed inside sandbox3/rootfs-complete
EXTRA_COMMANDS="
echo 'Executing EXTRA_COMMANDS UPupBB 01-05-2018............'
# fix PPM
echo \"PKG_REPOS_ENABLED=\' Packages-ubuntu-bionic-universe  Packages-ubuntu-bionic-main Packages-ubuntu-bionic-multiverse  Packages-puppy-ubb-official Packages-puppy-noarch-official \'\" >> root/.packages/PKGS_MANAGEMENT
rm root/.packages/Packages*upupbb
# Prepare for gyro's new init with overlayfs
cp etc/DISTRO_SPECS ../build
# Copy adrv, fdrv and README into iso
cp ../README-extra_sfs ../build && cp ../*drv*.sfs ../build
# fix udevd
ln -s /lib/systemd/systemd-udevd sbin/udevd
sed -i 's%bin/ash%bin/bash%' etc/rc.d/rc.sysinit
# 666philb says 121017
ln -s dbus etc/init.d/messagebus
# 666philb glib fix 240318 (+ also in root/Startup)
usr/lib/glib-2.0/glib-compile-schemas usr/share/glib-2.0/schemas || true 
usr/lib/glib-2.0/gio-querymodules usr/lib/gio/modules || true
# fix applications/defaults.list
echo 'inode/directory=defaultfilemanager.desktop' >> usr/share/applications/defaults.list
# ptheme fixes
sed -i 's%</JWM>%%' root/.jwm/jwmrc-personal
echo '<ButtonClose>/root/.jwm/window_buttons/close.png</ButtonClose><ButtonMax>/root/.jwm/window_buttons/max.png</ButtonMax><ButtonMaxActive>/root/.jwm/window_buttons/maxact.png</ButtonMaxActive><ButtonMin>/root/.jwm/window_buttons/min.png</ButtonMin></JWM>' >> root/.jwm/jwmrc-personal
sed -i 's%>Puppy Standard</Option>%>ROX</Option>%' root/.config/rox.sourceforge.net/ROX-Filer/Options
sed -i 's%show_thumbs\">0%show_thumbs\">1%' root/.config/rox.sourceforge.net/ROX-Filer/Options
sed -i 's%\"Places\"%\"Places\" icon=\"puppy.svg\"%' usr/share/jwm/tray_templates/Puppy/jwmrc-tray2
sed -i 's%\"Places\"%\"Places\" icon=\"puppy.svg\"%' root/.jwm/jwmrc-tray2
sed -i 's/%H:%M/%a %d %b %H:%M/' usr/share/jwm/tray_templates/Puppy/jwmrc-tray2
sed -i 's/%H:%M/%a %d %b %H:%M/' root/.jwm/jwmrc-tray2
# cursor default link
rm root/.icons/default && ln -s Premium root/.icons/default
# turn splash borders off
sed -i '/-border true|false (default: true)/ c\
-border true|false (default: false)' usr/lib/gtkdialog/box_splash
sed -i '/border=true/ c\
border=false' usr/lib/gtkdialog/box_splash
# set pup-event autoplay true
sed -i 's%HOTPLUGNOISY=false%HOTPLUGNOISY=true%' etc/eventmanager
# fix /etc/fonts/conf.avail/53-monospace-lcd-filter.conf
sed -i 's%DejaVu Sans Mono</string>%DejaVu Sans Mono</string></test><test name=\"family\">%' etc/fonts/conf.avail/53-monospace-lcd-filter.conf
# PupControl - reinstate simple wizardwizard + remove jwmdesk + disable momanager button
rm usr/sbin/wizardwizard && mv usr/sbin/wizardwizard.orig usr/sbin/wizardwizard
rm -rf usr/local/jwmdesk && rm usr/local/bin/jwmdesk && rm usr/share/applications/jwmdesk.desktop
mkdir usr/local/jwmdesk && ln -s /usr/sbin/ptheme usr/local/jwmdesk/jwmdesk
sed -i 's%momanager%disable-momanager%' usr/local/PupControl/PupControl-bin
rm usr/local/PupControl/Shutdown && ln -s /usr/sbin/logout_gui usr/local/PupControl/Shutdown
# JWM remove move & resize coords
sed -i 's%MoveMode%MoveMode coordinates=\"off\"%' root/.jwm/jwmrc-personal
sed -i 's%ResizeMode%ResizeMode coordinates=\"off\"%' root/.jwm/jwmrc-personal
# Add Run to menu
sed -i '/help48.png/a<Program label=\"Run\" icon=\"go48.png\">/usr/local/bin/prun</Program>' etc/xdg/templates/_root_.jwmrc
sed -i '/help48.png/a<Program label=\"Run\" icon=\"go48.png\">/usr/local/bin/prun</Program>' root/.jwmrc
# Hide menu items
echo 'NoDisplay=true' >> usr/share/applications/FontManager.desktop
echo 'NoDisplay=true' >> usr/share/applications/Format-floppy-disk.desktop
echo 'NoDisplay=true' >> usr/share/applications/hardinfo.desktop
echo 'NoDisplay=true' >> usr/share/applications/jcontrol.desktop
echo 'NoDisplay=true' >> usr/share/applications/menumanager.desktop
echo 'NoDisplay=true' >> usr/share/applications/parcellite.desktop
echo 'NoDisplay=true' >> usr/share/applications/PupClockset.desktop
echo 'NoDisplay=true' >> usr/share/applications/Pup-Kview.desktop
echo 'NoDisplay=true' >> usr/share/applications/PupMenuEdit.desktop
echo 'NoDisplay=true' >> usr/share/applications/wallpaper.desktop
# Change some root directory icons
ln -s /usr/local/lib/X11/pixmaps/home48.png root/.DirIcon
ln -s /usr/local/lib/X11/pixmaps/edit48.png root/my-documents/.DirIcon
ln -s /usr/local/lib/X11/pixmaps/utility48.png root/my-applications/.DirIcon
ln -s /usr/local/lib/X11/pixmaps/connect48.png root/network/.DirIcon
ln -s /usr/local/lib/X11/pixmaps/www48.png root/Web-Server/.DirIcon
chown -R webuser:webgroup root/Web-Server/.DirIcon
# Remove Xcalc
rm usr/bin/xcalc
rm usr/share/applications/Xcalc-scientific-calculator.desktop
# link for rxvt
ln -s urxvt usr/bin/rxvt
# old lib links
ln -s libical.so.2 usr/lib/libical.so.1
# evince libs
ln -s libpoppler.so.73 usr/lib/libpoppler.so.62
ln -s ./nss/libsoftokn3.so usr/lib/libsoftokn3.so
ln -s libicui18n.so.60 usr/lib/libicui18n.so.56
ln -s libicuuc.so.60 usr/lib/libicuuc.so.56
ln -s libicudata.so.60 usr/lib/libicudata.so.56
ln -s libjpeg.so.62 usr/lib/libopenjp2.so.7
# osmo
ln -s libicalss.so.2 usr/lib/libicalss.so.1
# hexchat
ln -s libperl.so.5.26 usr/lib/libperl.so.5.18
ln -s liblua5.1.so.0 usr/lib/liblua5.2.so.0
# chromium prep
ln -s libpcre.so.3 lib/libpcre.so.1
# disable services (mavrothal)
chmod 644 etc/init.d/rc.yassm
chmod 644 etc/init.d/rc.umntshares
chmod 644 etc/init.d/rsync
# links for transmission from slacko-14.2 131017 ubb 070318
ln -s ../usr/lib/libcrypto.so.1.1 lib/libcrypto.so.1
ln -s ../usr/lib/libssl.so.1.1 lib/libssl.so.1
ln -s libevent-2.1.so.6 usr/lib/libevent-2.0.so.5
# UBB-Pup 221017
rm usr/lib/libbabeltrace-lttng-live.so.1.0.0
# rm usr/lib/libva-* fixed in DISTRO_PKGS_SPECS 010518
ln -s libdirectfb-1.7.so.7 usr/lib/libdirectfb-1.2.so.9
ln -s python3.6 usr/bin/python3
# /etc/fstab not required 010517
rm etc/fstab && touch etc/fstab
# cpu temp in tray
ln -s /usr/bin/pmcputemp root/Startup/pmcputemp
# fix new .deb type 160318
ln -s application_x-deb etc/xdg/rox.sourceforge.net/MIME-types/application_vnd.debian.binary-package
ln -s application-x-deb.png usr/local/apps/ROX-Filer/ROX/MIME/application-vnd.debian.binary-package.png
# fix new font/*** types 110418
ln -s application-x-font.png usr/local/apps/ROX-Filer/ROX/MIME/font-ttf.png
ln -s application-x-font.png usr/local/apps/ROX-Filer/ROX/MIME/font-woff.png
ln -s application-x-font.png usr/local/apps/ROX-Filer/ROX/MIME/font-otf.png
ln -s application_x-font-ttf root/Choices/MIME-types/font_ttf
ln -s application_x-font-ttf root/Choices/MIME-types/font_woff
ln -s application_x-font-ttf root/Choices/MIME-types/font_otf
ln -s application_x-font-ttf root/Choices/MIME-types/application_x-font-pcf
"
